#!/usr/bin/python
# coding=utf-8
from flask_restplus import Api, Resource, fields
from flask import Flask, request
from flask_restplus import Api, Resource, fields
from flask_restplus._http import HTTPStatus

# @p_namespace.route('/todo_list.sdo')
class TodoList(Resource):

    def __init__(self, **kwargs):
        """

        """
        self.my_bar = kwargs['my_bar']

    # @p_namespace.doc('Get_Plan_List')
    # @p_namespace.param('changenumber', '变更单号')
    # @p_namespace.param('mindate', '起始日期')
    # @p_namespace.param('maxdate', '截至日期')
    # #
    # @p_namespace.marshal_with(record_list_model, code=HTTPStatus.OK, description="000")
    # @p_namespace.response(HTTPStatus.ARGUMENTS_ERROR, 'need at least one argument')
    # @p_namespace.response(HTTPStatus.HTTP_NOT_FOUND, 'no record found')
    # @p_namespace.response(HTTPStatus.HTTP_GET_SUCCESS, 'query success')

    # 后来对比了下官方DEMO，发现doc和marshal_with()或者expect()要放到一起写才行：
    # @p_namespace.doc('create_todo 我是DO， 我顶你个肺')
    # @p_namespace.expect(model_todo)
    #@p_namespace.marshal_with(model_todo, code=HTTPStatus.OK, description="000")
    def post(self):
        """

        Create a new task
        """
        response = "success"
        status_code = 200
        return response, status_code
